Assigning a Default Palette to an Application
Your application can define a palette for the Operating System to use when it
needs to define the color environment. Defining a default palette for your color
application is useful if all your windows use the same palette, or if you use
old-style dialog and alert boxes: without an application palette, the system
uses its own default palette to define the color environment.
You set a palette as the application default by assigning it a resource ID of 0.
If the system needs a palette to define a color environment, it looks in the
resource fork of the application for the 'pltt' resource with an ID equal to 0 and
uses the palette that it contains. If the system cannot find this resource in the
application's resource fork, it uses its own default palette (resource 'pltt' ID =
0 in the System file). If the system has no default palette, it uses the
Once your application has set its color environment (by calling InitMenus, or InitPalettes in unusual instances when there are no menus), you can find the default palette for your application by using the GetPalette function. You can change the default palette by specifying a palette in the SetPalette procedure.